<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>学校列表</title>
        <link href="/botutp/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/botutp/Public/admin/js/jquery.js"></script>
    </head> 
    <body> 
        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li><a href="<?php echo U('index/welcome');?>">首页</a></li>
                <li><a href="<?php echo U('school/index');?>">学校列表</a></li>
            </ul>
        </div> 
        <div class="formbody">
            <ul class="toolbar">
                <li onclick="location.href = '<?php echo U('school/add');?>'"><span><img src="/botutp/Public/admin/images/t01.png" /></span>添加学校</li> 
            </ul> 
            <form name="seachform" id="seachform" action="<?php echo U('school/index');?>" method="post">
                <ul class="seachform">
                    <li><label>学校名</label><input name="sname" id="keyword" value="<?=I('sname')?>" type="text" class="scinput" /></li>		
                    <li><label>所属省份</label>
                        <select id="area" name="province"  class="scinput">
                            <option value="">选择省份</option>
                            <?php if(is_array($provinceList)): $i = 0; $__LIST__ = $provinceList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?><option value="<?php echo ($data["pname"]); ?>" <?php if(I('province')==$data['pname'])echo 'selected'?>><?php echo ($data["pname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                        </select>
                    </li>		
                    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
                </ul>
            </form>

            <table class="tablelist">
                <thead>
                    <tr>
                        <th>学校名</th>
                        <th style="width: 400px;">IP段</th>
                        <th>可下载次数</th>
                        <th>已下载次数</th>
                        <th>所属省份</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <?php if(is_array($dataList)): $i = 0; $__LIST__ = $dataList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?><tr> 
                            <td><?php echo ($value["sname"]); ?></td>
                            <td><?php echo ($value["ip"]); ?></td>
                            <td><?php echo ($value["kxz"]); ?></td>
                            <td><?php echo ($value["yxz"]); ?></td>
                            <td><?php echo ($value["province"]); ?></td>
                            <td>
                                <a href="<?php echo U('school/edit',array('id'=>$value['id']));?>" class="tablelink">编辑</a>
                                <a href="<?php echo U('school/delete',array('id'=>$value['id']));?>" onclick="{
                                            if (confirm('确认删除?')) {
                                                return true;
                                            }
                                            return false;
                                        }" class="tablelink">删除</a>						
                            </td>
                        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                </tbody>
            </table>
            <?php echo ($pageshow); ?>
        </div>
        <script type="text/javascript">
            $('.tablelist tbody tr:odd').addClass('odd');
        </script>
    </body>

</html>